package chapter6;
import java.util.Scanner;
/****************************************************************
 * Author：icynlau
 * Description: 
A number is a palindrome（回文） if its reversal is the same as itself.

Write a method with the following header:

// Return true if number is a palindrome

public static boolean isPalindrome(int number)
 * Date:2021/4/6
 * ***************************************************************
 */
public class pta6_1 {
	
	 public static void main(String[] args) {
	        Scanner input = new Scanner(System.in);
	        int number1 = input.nextInt();
	        int number2 = input.nextInt();
	        System.out.println(isPalindrome(number1) + " " + isPalindrome(number2));
	    }

	
	public static boolean isPalindrome(int number) {
		
		String s=String.valueOf(number);
		
		boolean ret=true;
		
		for(int i=0;i<s.length()-1;i++) {
			
			if(s.charAt(i)!=s.charAt(s.length()-i-1)) {
				ret=false;
			}
			
		}
		
		return ret;
		
	}

}
